<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="t" tagdir="/WEB-INF/tags"%>
<%@taglib prefix="user" uri="/WEB-INF/tags/ErrorTag.tld"%>

<t:basicTemplate pageTitle="SWIMv2 - Create message">

	<jsp:attribute name="extrahead">
		<link rel="stylesheet" href="css/message.css" type="text/css" />
		<script type="text/javascript" src="script/inboxSetRead.js"></script>
	</jsp:attribute>

	<jsp:body>
		<h1>Messages</h1>
		
		<div class="error-style">
				<user:errors error="${param.error}"></user:errors>
		</div>
		
		<div id="linkContainer">
			<a href="inboxMessage">Inbox</a>
			<a href="write">Send Message</a>
			<a href="sentMessageController">Sent Message</a>
		</div>
		
		
		<div class="align" id="messageContainer">
			<%@ include file="InboxMessages.jsp"%>
			<%@ include file="SentMessages.jsp"%>
			
			<c:if test="${write == 'true'}">
				<%@ include file="WriteMessages.jsp"%>
			</c:if>
			
			<c:if test="${param.message == 'sendSucces'}">
				<t:errorAndMessage message="Message correctly sent" />
			</c:if>
			
		</div>
		
		
	
    </jsp:body>
</t:basicTemplate>